'use strict';

const Service = require('egg').Service;

class MongooseService extends Service {
  async create({ name, model }) {
    return await this.ctx.model[name].create(model);
  }
}

module.exports = MongooseService;
